<%@ page pageEncoding="UTF-8"%>

<%@ taglib uri="/tags/struts-tiles" prefix="tiles"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<%@ taglib uri="/tags/struts-nested" prefix="nested"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/tags/trymore" prefix="tm"%>

<script type="text/javascript">
	$(function(){
		$.each($("textarea", $("#formRole")), function(){
			$(this).html($(this).text().replace(/<br\/>/g,"\n"));
		});
		
	});
</script>

<div class="pageContent">
	<form method="post" action="app/system/role.do?action=actionSavaRole" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);" id="formRole">
		<div class="pageFormContent" layoutH="56">
			<table cellspacing="10" cellpadding="10" class="dform">
				<tr>
					<td>角色标识符：</td>
					<td>
						<input name="roleKey" type="text" size="30" value="${entity ne null ? entity.roleKey : ''}" class="required" style="width: 88%" ${entity ne null ? 'readonly' : ''}/>
					</td>
				</tr>
				<tr>
					<td>角色名称：</td>
					<td><input name="roleName" type="text" size="30" value="${entity ne null ? entity.roleName : ''}" class="required" style="width: 88%"/></td>
				</tr>
				<tr>
					<td style="width: 80px;">角色类型：</td>
					<td>
						<select class="combox" name="roleAdminFlag" id="dialog_roleType">
							<option value="0" ${entity ne null && entity.roleAdminFlag eq 0 ? 'selected' : ''}>系统普通用户</option>
							<option value="1" ${entity ne null && entity.roleAdminFlag eq 1 ? 'selected' : ''}>系统管理人员</option>
						</select>
					</td>
				</tr>
				<tr>
					<td>角色属性：</td>
					<td>
						<select class="combox" name="roleProperty" id="dialog_roleProp">
							<option value="0" ${entity ne null && entity.roleProperty eq 0 ? 'selected' : ''}>无</option>
							<option value="1" ${entity ne null && entity.roleProperty eq 1 ? 'selected' : ''}>项目高层</option>
						</select>
					</td>
				</tr>
				<tr>
					<td>角色描述：</td>
					<td>
						<textarea rows="5" cols="40" name="roleDesc" style="width: 88%">${entity ne null ? entity.roleDesc : ''}</textarea>
					</td>
				</tr>
			</table>
		</div>
		<div class="formBar">
			<ul>
				<li>
					<div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div>
				</li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
		<input type="hidden" name="id" value="${entity ne null ? entity.id : '-1'}" />
	</form>
<div>